package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.CarCostDetailMapper;
import com.ly.heart.service.ICarCostDetailService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.CarCostDetailEntity;
import javax.annotation.Resource;

/**
 * 车辆费用单明细信息Service业务层处理
 *
 * @author cxl
 * @date 2024-09-08
 */
@Service
public class CarCostDetailServiceImpl extends ServiceImpl<CarCostDetailMapper,CarCostDetailEntity> implements ICarCostDetailService {

    @Resource
    private CarCostDetailMapper carCostDetailMapper;

    /**
     * 查询车辆费用单明细信息
     *
     * @param id 车辆费用单明细信息ID
     * @return 车辆费用单明细信息
     */
    @Override
    public CarCostDetailEntity selectCarCostDetailEntityById(String id)
    {
        return carCostDetailMapper.selectCarCostDetailEntityById(id);
    }

    /**
     * 查询车辆费用单明细信息列表
     *
     * @param carCostDetailEntity 车辆费用单明细信息
     * @return 车辆费用单明细信息
     */
    @Override
    public List<CarCostDetailEntity> selectCarCostDetailEntityList(CarCostDetailEntity carCostDetailEntity)
    {
        return carCostDetailMapper.selectCarCostDetailEntityList(carCostDetailEntity);
    }

    /**
     * 新增车辆费用单明细信息
     *
     * @param carCostDetailEntity 车辆费用单明细信息
     * @return 结果
     */
    @Override
    public int insertCarCostDetailEntity(CarCostDetailEntity carCostDetailEntity)
    {
        carCostDetailEntity.setCreateTime(DateUtils.getNowDate());
        return carCostDetailMapper.insertCarCostDetailEntity(carCostDetailEntity);
    }

    /**
     * 修改车辆费用单明细信息
     *
     * @param carCostDetailEntity 车辆费用单明细信息
     * @return 结果
     */
    @Override
    public int updateCarCostDetailEntity(CarCostDetailEntity carCostDetailEntity)
    {
        carCostDetailEntity.setUpdateTime(DateUtils.getNowDate());
        return carCostDetailMapper.updateCarCostDetailEntity(carCostDetailEntity);
    }

    /**
     * 批量删除车辆费用单明细信息
     *
     * @param ids 需要删除的车辆费用单明细信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCostDetailEntityByIds(String[] ids)
    {
        return carCostDetailMapper.deleteCarCostDetailEntityByIds(ids);
    }

    /**
     * 删除车辆费用单明细信息信息
     *
     * @param id 车辆费用单明细信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCostDetailEntityById(String id)
    {
        return carCostDetailMapper.deleteCarCostDetailEntityById(id);
    }
}
